program Agecfi;

uses
  Forms,
  Controls,
  SysUtils,
  Principal in 'Principal.pas' {FPrincipal},
  SenhaAdministrador in 'SenhaAdministrador.pas' {FSenhaAdministrador},
  Splash in 'Splash.pas' {FSplash},
  CaminhoBD in 'CaminhoBD.pas' {FCaminhoBD},
  VisualizaEvento in 'VisualizaEvento.pas' {FVisualizaEvento},
  Configuracoes in 'Configuracoes.pas' {FConfiguracoes},
  Clientes in 'Clientes.pas' {FClientes},
  Busca_Clientes in 'Busca_Clientes.pas' {FBusca_Clientes},
  Clientes_Lcto in 'Clientes_Lcto.pas' {FClientes_Lcto};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  FSplash:=TFSplash.Create(Application);
  FSplash.ShowModal;
  FSplash.Free;
  Application.CreateForm(TFPrincipal, FPrincipal);
  if FPrincipal.DBAgecfi.Connected then
     begin
        FSenhaAdministrador:=TFSenhaAdministrador.Create(Application);
        FSenhaAdministrador.ShowModal;
        if not abortar then
           begin
              Application.Run;
              FSenhaAdministrador.Free;
           end
        else
           begin
              Screen.Cursor:=crDefault;
              FPrincipal.DBAgecfi.Close;
              Application.Terminate;
           end;
     end
  else
     Application.Terminate;
  Application.Run;
end.
